<?php
/**
 * Unfuddle API Authentication
 * This class contains authentication information for making authenticated
 * requests to the Unfuddle API.
 *
 * @package     Unfuddle
 * @subpackage  API Authentication
 * @author      Luke Visinoni <luke.visinoni@gmail.com>
 * @copyright   (c) 2010 Luke Visinoni <luke.visinoni@gmail.com>
 * @version     $Id: Auth.php 5 2011-01-12 18:26:29Z luke.visinoni $
 */
class Unfuddle_Auth {

    protected $_username;
    
    protected $_password;
    
    public function __construct($username, $password) {
    
        $this->setUsername($username)
             ->setPassword($password);
    
    }
    
    public function setUsername($username) {
    
        $this->_username = (string) $username;
        return $this;
    
    }
    
    public function getUsername() {
    
        return $this->_username;
    
    }
    
    public function setPassword($password) {
    
        $this->_password = (string) $password;
        return $this;
    
    }
    
    public function getPassword() {
    
        return $this->_password;
    
    }
    
    public function __toString() {
    
        return sprintf("%s:%s", $this->getUsername(), $this->getPassword());
    
    }

}